// File:    Cliente.cs
// Author:  Lucas Bittencourt
// Created: quarta-feira, 16 de novembro de 2011 18:32:47
// Purpose: Definition of Class Cliente

using System;
using System.Text;

namespace DA_OOMModel
{
   public class Sacado
   {
       private int sacIdSacado;

       private Pessoa pessoa;
      
      /// <summary>
      /// Property for Pessoa
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual Pessoa Pessoa
      {
         get
         {
            return pessoa;
         }
         set
         {
               this.pessoa = value;
         }
      }
   
      /// <summary>
      /// Get value of property SacIdSacado.
      /// </summary>
      public virtual int SacIdSacado
      {
         get
         {
            return sacIdSacado;
         }
         set
         {
            if (this.sacIdSacado != value)
               this.sacIdSacado = value;
         }
      }
   
      /// <summary>
      /// Get and set primary key class
      /// </summary>
      public virtual SacadoPK SacadoPK
      {
         get 
         {
            return new SacadoPK(sacIdSacado);
         }
         set
         {
            if (value != null)
            {
               this.sacIdSacado = value.SacIdSacado;
            }
         }
      }
   
      /// <summary>
      /// Get hash code
      /// </summary>
      /// <pdGenerated>Get hash code</pdGenerated>
      public override int GetHashCode()
      {
         int _hashCode = 0;
         _hashCode = 29 * SacadoPK.GetHashCode();
         return _hashCode;
      }
   
      /// <summary>
      /// Test if two objects are equal
      /// </summary>
      /// <param name="object">Object to compare</param>
      /// <pdGenerated>Test if two objects are equal</pdGenerated>
      public override bool Equals(object obj)
      {
         if (obj == null)
            return false;
         Sacado cast = obj as Sacado;
         if (!(obj is Sacado))
            return false;
         if (!this.SacadoPK.Equals(cast.SacadoPK))
            return false;
         if (this.sacIdSacado != cast.SacIdSacado)
            return false;
      
         return true;
      }
   
      /// <summary>
      /// Get object in string format
      /// </summary>
      /// <pdGenerated>Get object in string format</pdGenerated>
      public override string ToString()
      {
         StringBuilder ret = new StringBuilder();
         ret.Append( "Sacado: " );
         ret.Append( "SacIdSacado='" + sacIdSacado.ToString() + "'");
         return ret.ToString();
      }
   
   }
}